package cl.orangepeople.whyem.portal.backend.api.utils;

import cl.whyem.sir.ws.Header;
import cl.whyem.sir.ws.Rut;

public class BackendObjectsFactory {

    public static Rut newInstanceRut(String clientID) {
        Rut rut = new Rut();
        Integer intRUT = FormatterUtils.parseRut(clientID);
        rut.setNumero(intRUT.toString());
        rut.setDv(String.valueOf(FormatterUtils.getDV(intRUT)));
        return rut;
    }
    
    public static Header newInstanceHeader() {
        Header header = new Header();
        header.setTimestamp(FechaUtils.getActualDateTimestamp());
	header.setTerminal("01");
	header.setCanal("Web");
	header.setEntidad("10");
	header.setSecuencia(0L);
        return header;
    } 
}
